import * as yaml from 'yamljs';
import * as path from 'path';

const config = yaml.load(path.join(process.cwd(), './config/default.yml'));

// 数据库地址
const env = process.env.NODE_ENV;
if (env == 'dev') config.mongo.url = config.mongo.url_dev;
else if (env == 'test') config.mongo.url = config.mongo.url_test;

export { config };